package com.ruoyi.retailer.controller;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.retailer.service.RetailerService;
import com.ruoyi.system.api.RemoteLogisticsService;
import com.ruoyi.system.api.domain.TraceTransport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/retailer")
public class RetailerController {

    @Autowired
    private RemoteLogisticsService remoteLogisticsService;

    @PostMapping("/updateReceiveStatus")
    public AjaxResult updateReceiveStatus(@RequestBody TraceTransport traceTransport) {
        R<Integer> receiveStatus = remoteLogisticsService.updateReceiveStatus(traceTransport, SecurityConstants.INNER);
        return AjaxResult.success(receiveStatus.getData());
    }
}
